/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package skyproc;

import java.util.Objects;

/**
 *
 * @author Justin Swanson
 */
public class DestructionData extends SubShell {

    SubData DEST = new SubData(Type.DEST);
    SubData DSTD = new SubData(Type.DSTD);
    SubData DMDL = new SubData(Type.DMDL);
    SubData DMDT = new SubData(Type.DMDT);
    SubData DMDS = new SubData(Type.DMDS);

    static Type[] types = new Type[] { Type.DEST, Type.DSTD, Type.DMDL, Type.DMDT, Type.DMDS };

    DestructionData () {
	super(types);

	subRecords.add(DEST);
	subRecords.add(DSTD);
	subRecords.add(DMDL);
	subRecords.add(DMDT);
	subRecords.add(DMDS);
    }

    @Override
    SubRecord getNew(Type type) {
	return new DestructionData();
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final DestructionData other = (DestructionData) obj;
        if (!Objects.equals(this.DEST, other.DEST)) {
            return false;
        }
        if (!Objects.equals(this.DSTD, other.DSTD)) {
            return false;
        }
        if (!Objects.equals(this.DMDL, other.DMDL)) {
            return false;
        }
        if (!Objects.equals(this.DMDT, other.DMDT)) {
            return false;
        }
        if (!Objects.equals(this.DMDS, other.DMDS)) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 41 * hash + Objects.hashCode(this.DEST);
        hash = 41 * hash + Objects.hashCode(this.DSTD);
        hash = 41 * hash + Objects.hashCode(this.DMDL);
        hash = 41 * hash + Objects.hashCode(this.DMDT);
        hash = 41 * hash + Objects.hashCode(this.DMDS);
        return hash;
    }
}
